package 删除公共字符;

import java.util.Scanner;

public class Main {
    static boolean[] st = new boolean[200];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String s2 = in.nextLine();

        for (int i = 0; i < s2.length(); i++) {
            char ch = s2.charAt(i);
            if (ch == ' ') {
                continue;
            }
            st[ch] = true;
        }

        for (int i = 0; i < s1.length(); i++) {
            char ch = s1.charAt(i);
            if(!st[ch]){
                System.out.print(ch);
            }
        }
    }
}